//
//  HQAppUtils.h
//  VirtualCurrency
//
//  Created by apple on 2021/7/5.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, beforeDateStyle) {
    dateBeforeStyleWithDay,
    dateBeforeStyleWithWeek,
    dateBeforeStyleWithMonth,
    dateBeforeStyleWithYear
};

@interface HQAppUtils : NSObject
//关闭键盘
+ (void)closeKeyBorad;

/********************* SVProgressHUD **********************/
//弹出操作错误信息提示框
+ (void)showAlertViewTitle:(NSString*)title Message:(NSString *)message;

//弹出操作错误信息提示框,finish为点击确定按钮回调事件。
+ (void)showAlertViewTitle:(NSString *)title Message:(NSString *)message actionTitle:(NSString*)actionTitle finish:(void (^)(void))finish;
+ (void)showAlertViewTitle:(NSString *)title Message:(NSString *)message sureTitle:(NSString*)sureTitle cancelTitle:(NSString*)cancelTitle finish:(void (^)(void))finish;
+ (void)showActionSheetViewTitle:(NSString *)title Message:(NSString *)message sureTitle:(NSString*)sureTitle cancelTitle:(NSString*)cancelTitle finish:(void (^)(void))finish;

//弹出操作错误信息提示框
+ (void)showErrorMessage:(NSString *)message;

//弹出操作成功信息提示框
+ (void)showSuccessMessage:(NSString *)message;

//弹出加载提示框
+ (void)showProgressMessage:(NSString *) message;

//弹出加载提示框,此时屏幕不响应用户点击事件
+ (void)showProgressMessageWithNotAllowTouch:(NSString *)message;

//弹出信息提示框
+ (void)showInfoMessage:(NSString *)message;

//取消弹出框
+ (void)dismissHUD;

//时间戳转化成字符串类型日期
+ (NSString*)intgerDateForStringDateWithFormatter:(NSString*)formatter timeInterval:(NSTimeInterval)timeInterval;

/**
 获取当前日期之前的某个日期

 @param style 日期类型
 @param format 日期格式
 @param poor 差
 @return 日期时间段
 */
+ (NSString*)getCurrentDateBeforeWith:(beforeDateStyle)style format:(NSString*)format poor:(NSInteger)poor;

/**
 计算两个时间差
 
 @param timeOne 时间一
 @param timeTwo 时间二
 @return 返回差
 */
+ (NSInteger)compareWithTwoTimeByJetLag:(NSDate *)timeOne timeTwo:(NSDate*)timeTwo;

/**
 通过时间戳和格式显示时间
 
 @param timestamp 时间戳
 @param formatter 日期格式
 
 @return 日期字符串
 */
+ (NSString *)getStringWithTimestamp:(NSTimeInterval)timestamp formatter:(NSString*)formatter;

/**
 网络状态
 
 @return 提示语
 */
+(NSString *)returnNetworkState;

/**
 网络模式提示
 */
+ (void)monitorNetworkStateHUD;

/**
 替换nil

 @param string 需要处理的字符
 @param replacString 用此字符替换
 @return 替换好的字符
 */
+ (NSString*)replaceNilWithString:(NSString*)string forString:(NSString*)replacString;


@end

NS_ASSUME_NONNULL_END
